<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加商品</title>
    </head>
<body>
    <a href="/storehome/" class="button">返回</a>
    <div class="container mt-5">
        <h1>添加商品</h1>
        <form action="/add_product/" method="post">
            {% csrf_token %}
            <div class="mb-3">
                <label for="id_productid" class="form-label">产品ID</label>
                {{ form.productid.errors }}
                {{ form.productid }}
            </div>
            <div class="mb-3">
                <label for="id_pname" class="form-label">产品名称</label>
                {{ form.pname.errors }}
                {{ form.pname }}
            </div>
            <div class="mb-3">
                <label for="id_price" class="form-label">价格</label>
                {{ form.price.errors }}
                {{ form.price }}
            </div>
            <div class="mb-3">
                <label for="id_inventory" class="form-label">库存</label>
                {{ form.inventory.errors }}
                {{ form.inventory }}
            </div>
            <button type="submit" class="btn btn-primary">添加商品</button>
        </form>
    </div>
   </body>
</html>